<template>
  <h2>组件-props</h2>
  <button @click="count++">+</button>
  <Child :count="count" />
</template>

<script>
import Child from "./11-child.vue";
import { ref } from "vue";
export default {
  setup() {
    const count = ref(3);
    return { count };
  },
  // components是不能写到setup里面去的
  components: {
    Child,
  },
  // data() {
  //   return {
  //     name: "zhangsan",
  //     num: 9
  //   };
  // },
};
</script>
